#ifndef MARKDOWN_CPP_MENUBAR_H
#define MARKDOWN_CPP_MENUBAR_H

#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
#include "DataDef.h"
#include "AddNoteBookDialog.h"
#include "AddNoteDialog.h"
#include "Config.h"
#include "../utils/utils.h"

namespace hps {

// 菜单栏
class MenuBar: public QMenuBar {
Q_OBJECT
public:
    MenuBar(QMainWindow *parent);
    void setUi();
    void makeQAction();
    void addQAction();
    MenuBar *getMenuBar() { return this; }
    QAction* getToHtmlAction() const { return m_toHtmlFile; }
    QAction* getToJsonAction() const { return m_toJsonFile; }
    QAction* getToXmlAction() const { return m_toXmlFile; }
    QAction* getToPdfAction() const { return m_toPdfFile; }
    QAction* getAddBook() const { return m_addBook; }
    QAction* getOpenBook() const { return m_openBook; }
    QAction* getSaveFile() const { return m_saveFile; }
    QAction* getAddNote() const { return m_addNote; }
    QAction* getOpenNote() const { return m_openNote; }
    void rspFunc();

public slots:


private:
    QMenu *m_noteBookMenu;
    QMenu *m_noteMenu;
    QMenu *m_importMenu;
    QMenu *m_outPutMenu;
    QMenu *m_helpMenu;

    QAction *m_addBook;
    QAction *m_openBook;
    QAction *m_mgrBook;
    QAction* m_saveFile;

    QAction *m_addNote;
    QAction *m_openNote;
    QAction *m_mgrNote;

    QAction *m_importBook;
    QAction *m_importNote;

    QAction *m_toHtmlFile;
    QAction *m_toXmlFile;
    QAction *m_toJsonFile;
    QAction* m_toPdfFile;

    QAction* m_helpDoc;
};

}

#endif //MARKDOWN_CPP_MENUBAR_H
